package com.knife.oauth.app.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.knife.oauth.api.vo.IamMenuTree;
import com.knife.oauth.domain.entity.IamMenu;

import java.util.List;

/**
 * 菜单权限表(IamMenu)应用服务
 *
 * @author tianhao.luo@hand-china.com
 * @since 2025-08-13 14:19:32
 */
public interface IamMenuService {
    /**
     * 查询拥有的菜单树
     *
     * @return 树
     */
    List<IamMenuTree> selectTree(Long tenantId) throws IllegalAccessException;

    /**
     * 构造菜单树
     *
     * @param iamMenus 菜单
     * @return 树
     */
    List<IamMenuTree> buildTree(List<IamMenu> iamMenus) throws IllegalAccessException;

    /**
     * 修改菜单
     *
     * @param iamMenu 菜单信息
     * @return 菜单信息
     */
    IamMenu saveOrUpdateMenu(IamMenu iamMenu);


    /**
     * 删除菜单
     *
     * @param iamMenu 菜单信息
     * @return 菜单信息
     */
    IamMenu deleteMenu(IamMenu iamMenu);
}

